import request from '@/utils/request'

// 获取项目列表
export function getProject(query) {
  return request({
    url: '/business/project/list',
    method: 'get',
    params: query
  })
}

export function getTaksList(query) {
  return request({
    url: `/business/task/list`,
    method: 'get',
    params: query
  })
}

export function getTagList() {
  return request({
    url: `/business/task/tagList`,
    method: 'get',
  })
}

export function addTag(query) {
  return request({
    url: `/business/task/addTag`,
    method: 'get',
    params: query
  })
}
export function getStartDateList(query) {
  return request({
    url: `/business/task/taskDateList`,
    method: 'get',
    params: query
  })
}

export function addOrUpdateTask(query) {
  return request({
    url: `/business/task/addOrUpdate`,
    method: 'post',
    data: query
  })
}

export function getTaskDetail(id) {
  return request({
    url: `/business/task/${id}`,
    method: 'get',
  })
}

export function deleteTask(id) {
  return request({
    url: `/business/task/${id}`,
    method: 'delete',
  })
}


export function addComment(query) {
  return request({
    url: `/business/task/addComment`,
    method: 'post',
    data: query
  })
}


export function commentList(taskId) {
  return request({
    url: `/business/task/commentList/${taskId}`,
    method: 'get',
  })
}

export function deleteComment(commentId) {
  return request({
    url: `/business/task/deleteComment/${commentId}`,
    method: 'delete',
  })
}

export function finishTask(taskId, query) {
  return request({
    url: `/business/task/finish/${taskId}`,
    method: 'get',
    params: query
  })
}


export function auditCheck(taskId) {
  return request({
    url: `/business/task/auditCheck/${taskId}`,
    method: 'get',
  })
}

export function auditTaskReview(taskId, status, query) {
  return request({
    url: `/business/task/audit/${taskId}/${status}`,
    method: 'get',
    params: query
  })
}

export function scheduleList(query) {
  return request({
    url: `/business/task/scheduleList`,
    method: 'post',
    data: query
  })
}

export function collectApi(type,taskId) {
  return request({
    url: `/business/task/follow/${type}/${taskId}`,
    method: 'get',
  })
}




